*** Replication file for Trastulli, F., Left Parties' Strategies and Working-Class Vote in Contemporary Western Europe (2002-2020) – Accepted for publication in 2025 by Electoral Studies

**# set own directory
use Trastulli_ES.dta
set scheme s1mono

format w_sal_libaut_caramani_cb2 w_ecolr_caramani_sd2 w_sal_ecolr_caramani_sd2 caramani_eco_polar2 w_libaut_caramani_sd2 w_sal_libaut_caramani_sd2 caramani_la_polar2 w_ecolr_caramani_radl2 w_sal_ecolr_caramani_radl2 caramani_eco_polar2 w_libaut_caramani_radl2 w_sal_libaut_caramani_radl2 caramani_la_polar2 w_ecolr_caramani_cb2 w_sal_ecolr_caramani_cb2 caramani_eco_polar2 w_libaut_caramani_cb2 caramani_la_polar2 w_sal_libaut_bakkhob_cb2 w_sal_libaut_bakkhob_sd2 w_ecolr_bakkhob_sd2 w_sal_ecolr_bakkhob_sd2 ecolr_polarisation2 w_sal_libaut_caramani_radl2 w_libaut_caramani_cb2 w_libaut_bakkhob_cb2 %20.14f

**# Figure 1
preserve
collapse (mean) workingclass_oesch service_workers production_workers [pweight = survey_weight], by(cntry year)
drop if year==2023
set scheme s1mono
bysort year: egen workingclass_oesch_mean=mean(workingclass_oesch)
bysort year: egen production_workers_mean=mean(production_workers)
bysort year: egen service_workers_mean=mean(service_workers)
twoway ///
    (line workingclass_oesch_mean year if year<=2020, lcolor(blue) lpattern(solid) lwidth(medium)) ///
    (line production_workers_mean year if year<=2020, lcolor(red) lpattern(solid) lwidth(medium)) ///
    (line service_workers_mean year if year<=2020, lcolor(gold) lpattern(solid) lwidth(medium)) ///
    (lfit workingclass_oesch_mean year if year<=2020, lcolor(blue) lpattern(dash)) ///
    (lfit production_workers_mean year if year<=2020, lcolor(red) lpattern(dash)) ///
    (lfit service_workers_mean year if year<=2020, lcolor(gold) lpattern(dash)), ///
    legend(order(1 "Working class" 2 "Production workers" 3 "Service workers" ///
                 4 "Linear fit (WC)" 5 "Linear fit (PW)" 6 "Linear fit (SW)") ///
           cols(3) size(small) region(lstyle(none))) ///
    ytitle("Working class (%)") xtitle("Year") ///
    xscale(range(2002(3)2020))
graph save "Figure 1.gph", replace
restore

**# Figure 2
preserve
collapse (mean) workingclass_oesch service_workers production_workers [pweight = survey_weight], by(cntry year)
drop if year==2023
set scheme s1mono
bysort year: egen workingclass_oesch_mean=mean(workingclass_oesch)
bysort year: egen production_workers_mean=mean(production_workers)
bysort year: egen service_workers_mean=mean(service_workers)
twoway ///
    (line workingclass_oesch_mean year if year>=2002, lcolor(blue) lpattern(solid) lwidth(medium)) ///
    (line production_workers_mean year if year>=2002, lcolor(red) lpattern(solid) lwidth(medium)) ///
    (line service_workers_mean year if year>=2002, lcolor(gold) lpattern(solid) lwidth(medium)) ///
    (lfit workingclass_oesch_mean year if year>=2002, lcolor(blue) lpattern(dash)) ///
    (lfit production_workers_mean year if year>=2002, lcolor(red) lpattern(dash)) ///
    (lfit service_workers year if year>=2002, lcolor(gold) lpattern(dash)), ///
    by(cntry, cols(5) note("")) ///
    legend(order(1 "Working class" 2 "Production workers" 3 "Service workers" ///
                 4 "Linear fit (WC)" 5 "Linear fit (PW)" 6 "Linear fit (SW)") ///
           cols(3) size(small) region(lstyle(none))) ///
    ytitle("Working class (%)") xtitle("Year") ///
    xscale(range(2002(9)2020))
graph save "Figure 2.gph", replace
restore

**# Figure 3
bysort year: egen w_ecolr_cara_mean=mean(w_ecolr_caramani_cb2)
twoway ///
    (line w_ecolr_cara_mean year if year<=2020, lcolor(blue) lpattern(solid) lwidth(medium) ///
        legend(label(1 "Economic position") size(small))) ///
    (lfit w_ecolr_cara_mean year if year<=2020, lcolor(red) lpattern(dash) legend(label(2 "Linear fit") size(small))), ///
    ytitle("Economic position") xtitle("Year") ///
    xscale(range(2002(3)2020)) /// 
    legend(order(1 "Economic position" 2 "Linear fit") size(small) region(lstyle(none))) ///
	name(w_ecolr_caramani_cb2, replace)
bysort year: egen w_libaut_cara_mean=mean(w_libaut_caramani_cb2)
twoway ///
    (line w_libaut_cara_mean year if year<=2020, lcolor(blue) lpattern(solid) lwidth(medium) ///
        legend(label(1 "Cultural position") size(small))) ///
    (lfit w_libaut_cara_mean year if year<=2020, lcolor(red) lpattern(dash) legend(label(2 "Linear fit") size(small))), ///
    ytitle("Cultural position") xtitle("Year") ///
    xscale(range(2002(3)2020)) /// 
    legend(order(1 "Cultural position" 2 "Linear fit") size(small) region(lstyle(none))) ///
	name(w_libaut_caramani_cb2, replace)
bysort year: egen w_sal_ecolr_cara_mean=mean(w_sal_ecolr_caramani_cb2)
twoway ///
    (line w_sal_ecolr_cara_mean year if year<=2020, lcolor(blue) lpattern(solid) lwidth(medium) ///
        legend(label(1 "Economic salience") size(small))) ///
    (lfit w_sal_ecolr_cara_mean year if year<=2020, lcolor(red) lpattern(dash) legend(label(2 "Linear fit") size(small))), ///
    ytitle("Economic salience") xtitle("Year") ///
    xscale(range(2002(3)2020)) /// 
    legend(order(1 "Economic salience" 2 "Linear fit") size(small) region(lstyle(none))) ///
	name(w_sal_ecolr_caramani_cb2, replace)
bysort year: egen w_sal_libaut_cara_mean=mean(w_sal_libaut_caramani_cb2)
twoway ///
    (line w_sal_libaut_cara_mean year if year<=2020, lcolor(blue) lpattern(solid) lwidth(medium) ///
        legend(label(1 "Cultural salience") size(small))) ///
    (lfit w_sal_libaut_cara_mean year if year<=2020, lcolor(red) lpattern(dash) legend(label(2 "Linear fit") size(small))), ///
    ytitle("Cultural salience") xtitle("Year") ///
    xscale(range(2002(3)2020)) /// 
    legend(order(1 "Cultural salience" 2 "Linear fit") size(small) region(lstyle(none))) ///
	name(w_sal_libaut_caramani_cb2, replace)
bysort year: egen caramani_ecopolar2_mean=mean(caramani_eco_polar2)
twoway ///
    (line caramani_ecopolar2_mean year if year<=2020, lcolor(blue) lpattern(solid) lwidth(medium) ///
        legend(label(1 "Economic polarisation") size(small))) ///
    (lfit caramani_ecopolar2_mean year if year<=2020, lcolor(red) lpattern(dash) legend(label(2 "Linear fit") size(small))), ///
    ytitle("Economic polarisation") xtitle("Year") ///
    xscale(range(2002(3)2020)) /// 
    legend(order(1 "Economic polarisation" 2 "Linear fit") size(small) region(lstyle(none))) ///
	name(caramani_eco_polar2, replace)
bysort year: egen caramani_lapolar2_mean=mean(caramani_la_polar2)
twoway ///
    (line caramani_lapolar2_mean year if year<=2020, lcolor(blue) lpattern(solid) lwidth(medium) ///
        legend(label(1 "Cultural polarisation") size(small))) ///
    (lfit caramani_lapolar2_mean year if year<=2020, lcolor(red) lpattern(dash) legend(label(2 "Linear fit") size(small))), ///
    ytitle("Cultural polarisation") xtitle("Year") ///
    xscale(range(2002(3)2020)) /// 
    legend(order(1 "Cultural polarisation" 2 "Linear fit") size(small) region(lstyle(none))) ///
	name(caramani_la_polar2, replace)
graph combine w_ecolr_caramani_cb2 w_sal_ecolr_caramani_cb2 caramani_eco_polar2 w_libaut_caramani_cb2 w_sal_libaut_caramani_cb2 caramani_la_polar2, ysize(2.5) rows(2) cols(3)
graph save "Figure 3.gph", replace
drop w_ecolr_cara_mean w_libaut_cara_mean w_sal_ecolr_cara_mean w_sal_libaut_cara_mean caramani_ecopolar2_mean caramani_lapolar2_mean

**# Figure 4
melogit left_voting i.lgb ib(0).ageclass c.income_decile ib(0).education i.gndr ib(0).religion_den ib(0).ethnic_minority ib(0).urb_rur caramani_eco_polar2 caramani_la_polar2 w_ecolr_caramani_cb2 w_libaut_caramani_cb2  gincdif rec_imwbcnt ib(0).workingclass_oesch##c.year gini_pop gdp_imf wc_size visser_tud if agea>=18 & agea!=.a & year<=2020 [pweight = survey_weight], vce(cluster cntryn) or || cntry_year:
margins workingclass_oesch, at(year=(2002 2020)) 
marginsplot
graph save "Figure 4.gph", replace

**# Figure 5
melogit left_voting year i.lgb ib(0).ageclass c.income_decile ib(0).education i.gndr ib(0).religion_den ib(0).ethnic_minority ib(0).urb_rur ib(0).workingclass_oesch##c.w_sal_libaut_caramani_cb2 caramani_eco_polar2 caramani_la_polar2 w_sal_ecolr_caramani_cb2 gincdif rec_imwbcnt  gini_pop gdp_imf wc_size visser_tud if agea>=18 & agea!=.a & year<=2020 [pweight = survey_weight], vce(cluster cntryn) or || cntry_year:
margins workingclass_oesch, at(w_sal_libaut_caramani_cb2=(64.61941528320312  1102.82006835937500)) 
marginsplot
graph save "Figure 5.gph", replace

**# Figure 6
melogit msd_voting year i.lgb ib(0).ageclass c.income_decile ib(0).education i.gndr ib(0).religion_den ib(0).ethnic_minority ib(0).urb_rur ib(0).workingclass_oesch##c.w_ecolr_caramani_sd2 caramani_eco_polar2 caramani_la_polar2 w_libaut_caramani_sd2 gincdif rec_imwbcnt  gini_pop gdp_imf wc_size visser_tud if agea>=18 & agea!=.a & year<=2020 [pweight = survey_weight], vce(cluster cntryn) or || cntry_year:
margins workingclass_oesch, at(w_ecolr_caramani_sd2=(-1135.11791992187500 -22.18190002441406)) 
marginsplot, name(msd1, replace) 
melogit msd_voting year i.lgb ib(0).ageclass c.income_decile ib(0).education i.gndr ib(0).religion_den ib(0).ethnic_minority ib(0).urb_rur ib(0).workingclass_oesch##c.w_sal_ecolr_caramani_sd2 caramani_eco_polar2 caramani_la_polar2 w_sal_libaut_caramani_sd2 gincdif rec_imwbcnt  gini_pop gdp_imf wc_size visser_tud if agea>=18 & agea!=.a & year<=2020 [pweight = survey_weight], vce(cluster cntryn) or || cntry_year:
margins workingclass_oesch, at(w_sal_ecolr_caramani_sd2=(120.05955505371094 1318.60266113281250)) 
marginsplot, name(msd2, replace)
melogit msd_voting year i.lgb ib(0).ageclass c.income_decile ib(0).education i.gndr ib(0).religion_den ib(0).ethnic_minority ib(0).urb_rur ib(0).workingclass_oesch##c.caramani_eco_polar2 caramani_la_polar2 w_ecolr_caramani_sd2 w_libaut_caramani_sd2 gincdif rec_imwbcnt  gini_pop gdp_imf wc_size visser_tud if agea>=18 & agea!=.a & year<=2020 [pweight = survey_weight], vce(cluster cntryn) or || cntry_year:
margins workingclass_oesch, at(caramani_eco_polar2=(0.38565337657928 4.63260221481323)) 
marginsplot, name(msd3, replace)
melogit msd_voting year i.lgb ib(0).ageclass c.income_decile ib(0).education i.gndr ib(0).religion_den ib(0).ethnic_minority ib(0).urb_rur ib(0).workingclass_oesch##c.w_libaut_caramani_sd2 caramani_eco_polar2 caramani_la_polar2 w_ecolr_caramani_sd2 gincdif rec_imwbcnt  gini_pop gdp_imf wc_size visser_tud if agea>=18 & agea!=.a & year<=2020 [pweight = survey_weight], vce(cluster cntryn) or || cntry_year:
margins workingclass_oesch, at(w_libaut_caramani_sd2=(-578.11791992187500 650.63867187500000)) 
marginsplot, name(msd4, replace)
melogit msd_voting year i.lgb ib(0).ageclass c.income_decile ib(0).education i.gndr ib(0).religion_den ib(0).ethnic_minority ib(0).urb_rur ib(0).workingclass_oesch##c.w_sal_libaut_caramani_sd2 caramani_eco_polar2 caramani_la_polar2 w_sal_ecolr_caramani_sd2 gincdif rec_imwbcnt  gini_pop gdp_imf wc_size visser_tud if agea>=18 & agea!=.a & year<=2020 [pweight = survey_weight], vce(cluster cntryn) or || cntry_year:
margins workingclass_oesch, at(w_sal_libaut_caramani_sd2=(84.71755218505859 1102.82006835937500)) 
marginsplot, name(msd5, replace)
melogit msd_voting year i.lgb ib(0).ageclass c.income_decile ib(0).education i.gndr ib(0).religion_den ib(0).ethnic_minority ib(0).urb_rur ib(0).workingclass_oesch##c.caramani_la_polar2 caramani_eco_polar2 w_ecolr_caramani_sd2 w_libaut_caramani_sd2 gincdif rec_imwbcnt  gini_pop gdp_imf wc_size visser_tud if agea>=18 & agea!=.a & year<=2020 [pweight = survey_weight], vce(cluster cntryn) or || cntry_year:
margins workingclass_oesch, at(caramani_la_polar2=(0.48751103878021 5.29416227340698)) 
marginsplot, name(msd6, replace)
graph combine msd1 msd2 msd3 msd4 msd5 msd6, ysize(2.5) rows(2) cols(3)
graph save "Figure 6.gph", replace

**# Figure 7
melogit radleft_voting year i.lgb ib(0).ageclass c.income_decile ib(0).education i.gndr ib(0).religion_den ib(0).ethnic_minority ib(0).urb_rur ib(0).workingclass_oesch##c.w_ecolr_caramani_radl2 caramani_eco_polar2 caramani_la_polar2 w_libaut_caramani_radl2 gincdif rec_imwbcnt  gini_pop gdp_imf wc_size visser_tud if agea>=18 & agea!=.a & year<=2020 [pweight = survey_weight], vce(cluster cntryn) or || cntry_year:
margins workingclass_oesch, at(w_ecolr_caramani_radl2=(-751.73773193359375 -15.56321144104004)) 
marginsplot, name(mrl1, replace)
melogit radleft_voting year i.lgb ib(0).ageclass c.income_decile ib(0).education i.gndr ib(0).religion_den ib(0).ethnic_minority ib(0).urb_rur ib(0).workingclass_oesch##c.w_sal_ecolr_caramani_radl2 caramani_eco_polar2 caramani_la_polar2 w_sal_libaut_caramani_radl2 gincdif rec_imwbcnt  gini_pop gdp_imf wc_size visser_tud if agea>=18 & agea!=.a & year<=2020 [pweight = survey_weight], vce(cluster cntryn) or || cntry_year:
margins workingclass_oesch, at(w_sal_ecolr_caramani_radl2=(15.79017639160156 972.93566894531250)) 
marginsplot, name(mrl2, replace)
melogit radleft_voting year i.lgb ib(0).ageclass c.income_decile ib(0).education i.gndr ib(0).religion_den ib(0).ethnic_minority ib(0).urb_rur ib(0).workingclass_oesch##c.caramani_eco_polar2 caramani_la_polar2 w_ecolr_caramani_radl2 w_libaut_caramani_radl2 gincdif rec_imwbcnt  gini_pop gdp_imf wc_size visser_tud if agea>=18 & agea!=.a & year<=2020 [pweight = survey_weight], vce(cluster cntryn) or || cntry_year:
margins workingclass_oesch, at(caramani_eco_polar2=(0.38565337657928 4.63260221481323)) 
marginsplot, name(mrl3, replace)
melogit radleft_voting year i.lgb ib(0).ageclass c.income_decile ib(0).education i.gndr ib(0).religion_den ib(0).ethnic_minority ib(0).urb_rur ib(0).workingclass_oesch##c.w_libaut_caramani_radl2 caramani_eco_polar2 caramani_la_polar2 w_ecolr_caramani_radl2 gincdif rec_imwbcnt  gini_pop gdp_imf wc_size visser_tud if agea>=18 & agea!=.a & year<=2020 [pweight = survey_weight], vce(cluster cntryn) or || cntry_year:
margins workingclass_oesch, at(w_libaut_caramani_radl2=(-291.99197387695312 331.89620971679688)) 
marginsplot, name(mrl4, replace)
melogit radleft_voting year i.lgb ib(0).ageclass c.income_decile ib(0).education i.gndr ib(0).religion_den ib(0).ethnic_minority ib(0).urb_rur ib(0).workingclass_oesch##c.w_sal_libaut_caramani_radl2 caramani_eco_polar2 caramani_la_polar2 w_sal_ecolr_caramani_radl2 gincdif rec_imwbcnt  gini_pop gdp_imf wc_size visser_tud if agea>=18 & agea!=.a & year<=2020 [pweight = survey_weight], vce(cluster cntryn) or || cntry_year:
margins workingclass_oesch, at(w_sal_libaut_caramani_radl2=(7.38401365280151 813.65411376953125)) 
marginsplot, name(mrl5, replace)
melogit radleft_voting year i.lgb ib(0).ageclass c.income_decile ib(0).education i.gndr ib(0).religion_den ib(0).ethnic_minority ib(0).urb_rur ib(0).workingclass_oesch##c.caramani_la_polar2 caramani_eco_polar2 w_ecolr_caramani_radl2 w_libaut_caramani_radl2 gincdif rec_imwbcnt  gini_pop gdp_imf wc_size visser_tud if agea>=18 & agea!=.a & year<=2020 [pweight = survey_weight], vce(cluster cntryn) or || cntry_year:
margins workingclass_oesch, at(caramani_la_polar2=(0.48751103878021 5.29416227340698)) 
marginsplot, name(mrl6, replace)
graph combine mrl1 mrl2 mrl3 mrl4 mrl5 mrl6, ysize(2.5) rows(2) cols(3)
graph save "Figure 7.gph", replace

**# Appendix

*** Table A1 n/a
*** Table A2 n/a
*** Table A3 n/a
*** Table A4 n/a
**# Table A5
bysort year: sum workingclass_oesch [iweight=survey_weight]
bysort year: sum production_workers [iweight=survey_weight]
bysort year: sum service_workers [iweight=survey_weight]

**# Table A6
/*egen z_income_decile = std(income_decile)
egen z_caramani_eco_polar2 = std(caramani_eco_polar2)
egen z_caramani_la_polar2 = std(caramani_la_polar2)
egen z_w_sal_ecolr_caramani_cb2 = std(w_sal_ecolr_caramani_cb2)
egen z_w_sal_libaut_caramani_cb2 = std(w_sal_libaut_caramani_cb2)
egen z_w_ecolr_caramani_cb2 = std(w_ecolr_caramani_cb2)
egen z_w_libaut_caramani_cb2 = std(w_libaut_caramani_cb2)
egen z_gincdif = std(gincdif)
egen z_rec_imwbcnt = std(rec_imwbcnt)
egen z_year = std(year)
egen z_gini_pop = std(gini_pop)
egen z_gdp_imf = std(gdp_imf)
egen z_wc_size = std(wc_size)
egen z_visser_tud = std(visser_tud)*/
eststo clear
eststo reg1: melogit left_voting i.lgb ib(0).ageclass c.z_income_decile ib(0).education i.gndr ib(0).religion_den ib(0).ethnic_minority ib(0).urb_rur  c.z_gincdif c.z_rec_imwbcnt ib(0).workingclass_oesch year if agea>=18 & agea!=.a & year<=2020 [pweight = survey_weight], vce(cluster cntryn) or || cntry_year:
eststo reg2: melogit left_voting i.lgb ib(0).ageclass c.z_income_decile ib(0).education i.gndr ib(0).religion_den ib(0).ethnic_minority ib(0).urb_rur c.z_caramani_eco_polar2 c.z_caramani_la_polar2 c.z_w_ecolr_caramani_cb2 c.z_w_libaut_caramani_cb2 c.z_gincdif c.z_rec_imwbcnt ib(0).workingclass_oesch year c.z_gini_pop c.z_gdp_imf c.z_wc_size c.z_visser_tud if agea>=18 & agea!=.a & year<=2020 [pweight = survey_weight], vce(cluster cntryn) or || cntry_year:
eststo reg3: melogit left_voting i.lgb ib(0).ageclass c.z_income_decile ib(0).education i.gndr ib(0).religion_den ib(0).ethnic_minority ib(0).urb_rur c.z_caramani_eco_polar2 c.z_caramani_la_polar2 c.z_w_sal_ecolr_caramani_cb2 c.z_w_sal_libaut_caramani_cb2 c.z_gincdif c.z_rec_imwbcnt ib(0).workingclass_oesch year c.z_gini_pop c.z_gdp_imf c.z_wc_size c.z_visser_tud if agea>=18 & agea!=.a & year<=2020 [pweight = survey_weight], vce(cluster cntryn) or || cntry_year:
esttab using Table_A6.html, starlevels(* 0.05 ** 0.01 *** 0.001) scalars ("N") constant se(3) wide label mtitle b(3) replace brackets stats(N)
*** ICCs
melogit left_voting if agea>=18 & agea!=.a & year<=2020 [pweight = survey_weight], vce(cluster cntryn) or || cntry_year:
estat icc

**# Table A6_continued
/*egen z_ecolr_polarisation2 = std(ecolr_polarisation2)
egen z_libaut_polarisation2 = std(libaut_polarisation2)
egen z_w_sal_ecolr_bakkhob_cb2 = std(w_sal_ecolr_bakkhob_cb2)
egen z_w_sal_libaut_bakkhob_cb2 = std(w_sal_libaut_bakkhob_cb2)
egen z_w_ecolr_bakkhob_cb2 = std(w_ecolr_bakkhob_cb2)
egen z_w_libaut_bakkhob_cb2 = std(w_libaut_bakkhob_cb2)*/
eststo clear
eststo: melogit left_voting i.lgb ib(0).ageclass c.z_income_decile ib(0).education i.gndr ib(0).religion_den ib(0).ethnic_minority ib(0).urb_rur c.z_ecolr_polarisation2 c.z_libaut_polarisation2 c.z_w_ecolr_bakkhob_cb2 c.z_w_libaut_bakkhob_cb2 c.z_gincdif c.z_rec_imwbcnt ib(0).workingclass_oesch year c.z_gini_pop c.z_gdp_imf c.z_wc_size c.z_visser_tud if agea>=18 & agea!=.a & year<=2020 [pweight = survey_weight], vce(cluster cntryn) or || cntry_year:
estat icc
esttab using Table_A6_continued.html, starlevels(* 0.05 ** 0.01 *** 0.001) scalars ("N") constant se(3) wide label mtitle b(3) replace brackets stats(N)

eststo clear
eststo: melogit left_voting i.lgb ib(0).ageclass c.z_income_decile ib(0).education i.gndr ib(0).religion_den ib(0).ethnic_minority ib(0).urb_rur c.z_ecolr_polarisation2 c.z_libaut_polarisation2 c.z_w_sal_ecolr_bakkhob_cb2 c.z_w_sal_libaut_bakkhob_cb2 c.z_gincdif c.z_rec_imwbcnt ib(0).workingclass_oesch year c.z_gini_pop c.z_gdp_imf c.z_wc_size c.z_visser_tud if agea>=18 & agea!=.a & year<=2020 [pweight = survey_weight], vce(cluster cntryn) or || cntry_year:
estat icc
esttab using Table_A6_continued_sal.html, starlevels(* 0.05 ** 0.01 *** 0.001) scalars ("N") constant se(3) wide label mtitle b(3) replace brackets stats(N)
*** ICCs
melogit left_voting if agea>=18 & agea!=.a & year<=2020 [pweight = survey_weight], vce(cluster cntryn) or || cntry_year:
estat icc

**# Table A7
eststo clear
eststo: melogit left_voting i.lgb ib(0).ageclass c.income_decile ib(0).education i.gndr ib(0).religion_den ib(0).ethnic_minority ib(0).urb_rur caramani_eco_polar2 caramani_la_polar2 w_ecolr_caramani_cb2 w_libaut_caramani_cb2  gincdif rec_imwbcnt ib(0).workingclass_oesch##c.year gini_pop gdp_imf wc_size visser_tud if agea>=18 & agea!=.a & year<=2020 [pweight = survey_weight], vce(cluster cntryn) or || cntry_year:
esttab using Table_A7.html, starlevels(* 0.05 ** 0.01 *** 0.001) scalars ("N") constant se(3) wide label mtitle b(3) replace brackets
*** ICCs
melogit left_voting if agea>=18 & agea!=.a & year<=2020 [pweight = survey_weight], vce(cluster cntryn) or || cntry_year:
estat icc

**# Table A8
eststo clear
eststo: melogit left_voting year i.lgb ib(0).ageclass c.income_decile ib(0).education i.gndr ib(0).religion_den ib(0).ethnic_minority ib(0).urb_rur ib(0).workingclass_oesch##c.w_sal_libaut_caramani_cb2 caramani_eco_polar2 caramani_la_polar2 w_sal_ecolr_caramani_cb2 gincdif rec_imwbcnt  gini_pop gdp_imf wc_size visser_tud if agea>=18 & agea!=.a & year<=2020 [pweight = survey_weight], vce(cluster cntryn) or || cntry_year:
esttab using Table_A8.html, starlevels(* 0.05 ** 0.01 *** 0.001) scalars ("N") constant se(3) wide label mtitle b(3) replace brackets
*** ICCs
melogit left_voting if agea>=18 & agea!=.a & year<=2020 [pweight = survey_weight], vce(cluster cntryn) or || cntry_year:
estat icc

**# Table A9
eststo clear
eststo: melogit msd_voting year i.lgb ib(0).ageclass c.income_decile ib(0).education i.gndr ib(0).religion_den ib(0).ethnic_minority ib(0).urb_rur ib(0).workingclass_oesch##c.w_ecolr_caramani_sd2 caramani_eco_polar2 caramani_la_polar2 w_libaut_caramani_sd2 gincdif rec_imwbcnt  gini_pop gdp_imf wc_size visser_tud if agea>=18 & agea!=.a & year<=2020 [pweight = survey_weight], vce(cluster cntryn) or || cntry_year:
eststo: melogit msd_voting year i.lgb ib(0).ageclass c.income_decile ib(0).education i.gndr ib(0).religion_den ib(0).ethnic_minority ib(0).urb_rur ib(0).workingclass_oesch##c.w_libaut_caramani_sd2 caramani_eco_polar2 caramani_la_polar2 w_ecolr_caramani_sd2 gincdif rec_imwbcnt  gini_pop gdp_imf wc_size visser_tud if agea>=18 & agea!=.a & year<=2020 [pweight = survey_weight], vce(cluster cntryn) or || cntry_year:
eststo: melogit msd_voting year i.lgb ib(0).ageclass c.income_decile ib(0).education i.gndr ib(0).religion_den ib(0).ethnic_minority ib(0).urb_rur ib(0).workingclass_oesch##c.w_sal_ecolr_caramani_sd2 caramani_eco_polar2 caramani_la_polar2 w_sal_libaut_caramani_sd2 gincdif rec_imwbcnt  gini_pop gdp_imf wc_size visser_tud if agea>=18 & agea!=.a & year<=2020 [pweight = survey_weight], vce(cluster cntryn) or || cntry_year:
eststo: melogit msd_voting year i.lgb ib(0).ageclass c.income_decile ib(0).education i.gndr ib(0).religion_den ib(0).ethnic_minority ib(0).urb_rur ib(0).workingclass_oesch##c.w_sal_libaut_caramani_sd2 caramani_eco_polar2 caramani_la_polar2 w_sal_ecolr_caramani_sd2 gincdif rec_imwbcnt  gini_pop gdp_imf wc_size visser_tud if agea>=18 & agea!=.a & year<=2020 [pweight = survey_weight], vce(cluster cntryn) or || cntry_year:
eststo: melogit msd_voting year i.lgb ib(0).ageclass c.income_decile ib(0).education i.gndr ib(0).religion_den ib(0).ethnic_minority ib(0).urb_rur ib(0).workingclass_oesch##c.caramani_eco_polar2 caramani_la_polar2 w_ecolr_caramani_sd2 w_libaut_caramani_sd2 gincdif rec_imwbcnt  gini_pop gdp_imf wc_size visser_tud if agea>=18 & agea!=.a & year<=2020 [pweight = survey_weight], vce(cluster cntryn) or || cntry_year:
eststo: melogit msd_voting year i.lgb ib(0).ageclass c.income_decile ib(0).education i.gndr ib(0).religion_den ib(0).ethnic_minority ib(0).urb_rur ib(0).workingclass_oesch##c.caramani_la_polar2 caramani_eco_polar2 w_ecolr_caramani_sd2 w_libaut_caramani_sd2 gincdif rec_imwbcnt  gini_pop gdp_imf wc_size visser_tud if agea>=18 & agea!=.a & year<=2020 [pweight = survey_weight], vce(cluster cntryn) or || cntry_year:
esttab using Table_A9.html, starlevels(* 0.05 ** 0.01 *** 0.001) scalars ("N") constant se(3) wide label mtitle b(3) replace brackets stats(N)
*** ICCs
melogit msd_voting if agea>=18 & agea!=.a & year<=2020 [pweight = survey_weight], vce(cluster cntryn) or || cntry_year:
estat icc

**# Table A10
eststo clear
eststo: melogit radleft_voting year i.lgb ib(0).ageclass c.income_decile ib(0).education i.gndr ib(0).religion_den ib(0).ethnic_minority ib(0).urb_rur ib(0).workingclass_oesch##c.w_ecolr_caramani_radl2 caramani_eco_polar2 caramani_la_polar2 w_libaut_caramani_radl2 gincdif rec_imwbcnt  gini_pop gdp_imf wc_size visser_tud if agea>=18 & agea!=.a & year<=2020 [pweight = survey_weight], vce(cluster cntryn) or || cntry_year:
eststo: melogit radleft_voting year i.lgb ib(0).ageclass c.income_decile ib(0).education i.gndr ib(0).religion_den ib(0).ethnic_minority ib(0).urb_rur ib(0).workingclass_oesch##c.w_libaut_caramani_radl2 caramani_eco_polar2 caramani_la_polar2 w_ecolr_caramani_radl2 gincdif rec_imwbcnt  gini_pop gdp_imf wc_size visser_tud if agea>=18 & agea!=.a & year<=2020 [pweight = survey_weight], vce(cluster cntryn) or || cntry_year:
eststo: melogit radleft_voting year i.lgb ib(0).ageclass c.income_decile ib(0).education i.gndr ib(0).religion_den ib(0).ethnic_minority ib(0).urb_rur ib(0).workingclass_oesch##c.w_sal_ecolr_caramani_radl2 caramani_eco_polar2 caramani_la_polar2 w_sal_libaut_caramani_radl2 gincdif rec_imwbcnt  gini_pop gdp_imf wc_size visser_tud if agea>=18 & agea!=.a & year<=2020 [pweight = survey_weight], vce(cluster cntryn) or || cntry_year:
eststo: melogit radleft_voting year i.lgb ib(0).ageclass c.income_decile ib(0).education i.gndr ib(0).religion_den ib(0).ethnic_minority ib(0).urb_rur ib(0).workingclass_oesch##c.w_sal_libaut_caramani_radl2 caramani_eco_polar2 caramani_la_polar2 w_sal_ecolr_caramani_radl2 gincdif rec_imwbcnt  gini_pop gdp_imf wc_size visser_tud if agea>=18 & agea!=.a & year<=2020 [pweight = survey_weight], vce(cluster cntryn) or || cntry_year:
eststo: melogit radleft_voting year i.lgb ib(0).ageclass c.income_decile ib(0).education i.gndr ib(0).religion_den ib(0).ethnic_minority ib(0).urb_rur ib(0).workingclass_oesch##c.caramani_eco_polar2 caramani_la_polar2 w_ecolr_caramani_radl2 w_libaut_caramani_radl2 gincdif rec_imwbcnt  gini_pop gdp_imf wc_size visser_tud if agea>=18 & agea!=.a & year<=2020 [pweight = survey_weight], vce(cluster cntryn) or || cntry_year:
eststo: melogit radleft_voting year i.lgb ib(0).ageclass c.income_decile ib(0).education i.gndr ib(0).religion_den ib(0).ethnic_minority ib(0).urb_rur ib(0).workingclass_oesch##c.caramani_la_polar2 caramani_eco_polar2 w_ecolr_caramani_radl2 w_libaut_caramani_radl2 gincdif rec_imwbcnt  gini_pop gdp_imf wc_size visser_tud if agea>=18 & agea!=.a & year<=2020 [pweight = survey_weight], vce(cluster cntryn) or || cntry_year:
esttab using Table_A10.html, starlevels(* 0.05 ** 0.01 *** 0.001) scalars ("N") constant se(3) wide label mtitle b(3) replace brackets stats(N)
*** ICCs
melogit radleft_voting if agea>=18 & agea!=.a & year<=2020 [pweight = survey_weight], vce(cluster cntryn) or || cntry_year:
estat icc


**# Figure A1
bysort year: egen w_ecolr_bh_mean=mean(w_ecolr_bakkhob_cb2)
twoway ///
    (line w_ecolr_bh_mean year if year<=2020, lcolor(blue) lpattern(solid) lwidth(medium) ///
        legend(label(1 "Economic position") size(small))) ///
    (lfit w_ecolr_bh_mean year if year<=2020, lcolor(red) lpattern(dash) legend(label(2 "Linear fit") size(small))), ///
    ytitle("Economic position") xtitle("Year") ///
    xscale(range(2002(3)2020)) /// 
    legend(order(1 "Economic position" 2 "Linear fit") size(small) region(lstyle(none))) ///
	name(w_ecolr_bakkhob_cb2, replace)
bysort year: egen w_libaut_bh_mean=mean(w_libaut_bakkhob_cb2)
twoway ///
    (line w_libaut_bh_mean year if year<=2020, lcolor(blue) lpattern(solid) lwidth(medium) ///
        legend(label(1 "Cultural position") size(small))) ///
    (lfit w_libaut_bh_mean year if year<=2020, lcolor(red) lpattern(dash) legend(label(2 "Linear fit") size(small))), ///
    ytitle("Cultural position") xtitle("Year") ///
    xscale(range(2002(3)2020)) /// 
    legend(order(1 "Cultural position" 2 "Linear fit") size(small) region(lstyle(none))) ///
	name(w_libaut_bakkhob_cb2, replace)
bysort year: egen w_sal_ecolr_bh_mean=mean(w_sal_ecolr_bakkhob_cb2)
twoway ///
    (line w_sal_ecolr_bh_mean year if year<=2020, lcolor(blue) lpattern(solid) lwidth(medium) ///
        legend(label(1 "Economic salience") size(small))) ///
    (lfit w_sal_ecolr_bh_mean year if year<=2020, lcolor(red) lpattern(dash) legend(label(2 "Linear fit") size(small))), ///
    ytitle("Economic salience") xtitle("Year") ///
    xscale(range(2002(3)2020)) /// 
    legend(order(1 "Economic salience" 2 "Linear fit") size(small) region(lstyle(none))) ///
	name(w_sal_ecolr_bakkhob_cb2, replace)
bysort year: egen w_sal_libaut_bh_mean=mean(w_sal_libaut_bakkhob_cb2)
twoway ///
    (line w_sal_libaut_bh_mean year if year<=2020, lcolor(blue) lpattern(solid) lwidth(medium) ///
        legend(label(1 "Cultural salience") size(small))) ///
    (lfit w_sal_libaut_bh_mean year if year<=2020, lcolor(red) lpattern(dash) legend(label(2 "Linear fit") size(small))), ///
    ytitle("Cultural salience") xtitle("Year") ///
    xscale(range(2002(3)2020)) /// 
    legend(order(1 "Cultural salience" 2 "Linear fit") size(small) region(lstyle(none))) ///
	name(w_sal_libaut_bakkhob_cb2, replace)
bysort year: egen bh_ecopolar2_mean=mean(ecolr_polarisation2)
twoway ///
    (line bh_ecopolar2_mean year if year<=2020, lcolor(blue) lpattern(solid) lwidth(medium) ///
        legend(label(1 "Economic polarisation") size(small))) ///
    (lfit bh_ecopolar2_mean year if year<=2020, lcolor(red) lpattern(dash) legend(label(2 "Linear fit") size(small))), ///
    ytitle("Economic polarisation") xtitle("Year") ///
    xscale(range(2002(3)2020)) /// 
    legend(order(1 "Economic polarisation" 2 "Linear fit") size(small) region(lstyle(none))) ///
	name(ecolr_polarisation2, replace)
bysort year: egen bh_lapolar2_mean=mean(libaut_polarisation2)
twoway ///
    (line bh_lapolar2_mean year if year<=2020, lcolor(blue) lpattern(solid) lwidth(medium) ///
        legend(label(1 "Cultural polarisation") size(small))) ///
    (lfit bh_lapolar2_mean year if year<=2020, lcolor(red) lpattern(dash) legend(label(2 "Linear fit") size(small))), ///
    ytitle("Cultural polarisation") xtitle("Year") ///
    xscale(range(2002(3)2020)) /// 
    legend(order(1 "Cultural polarisation" 2 "Linear fit") size(small) region(lstyle(none))) ///
	name(libaut_polarisation2, replace)
graph combine w_ecolr_bakkhob_cb2 w_sal_ecolr_bakkhob_cb2 ecolr_polarisation2 w_libaut_bakkhob_cb2 w_sal_libaut_bakkhob_cb2 libaut_polarisation2, ysize(2.5) rows(2) cols(3)
graph save "Figure A1.gph", replace
drop w_ecolr_bh_mean w_libaut_bh_mean w_sal_ecolr_bh_mean w_sal_libaut_bh_mean bh_ecopolar2_mean bh_lapolar2_mean

**# Figure A2
bysort year: egen w_ecolr_cara_mean=mean(w_ecolr_caramani_sd2)
twoway ///
    (line w_ecolr_cara_mean year if year<=2020, lcolor(blue) lpattern(solid) lwidth(medium) ///
        legend(label(1 "Economic position") size(small))) ///
    (lfit w_ecolr_cara_mean year if year<=2020, lcolor(red) lpattern(dash) legend(label(2 "Linear fit") size(small))), ///
    ytitle("Economic position") xtitle("Year") ///
    xscale(range(2002(3)2020)) /// 
    legend(order(1 "Economic position" 2 "Linear fit") size(small) region(lstyle(none))) ///
	name(sds1, replace)
bysort year: egen w_sal_ecolr_cara_mean=mean(w_sal_ecolr_caramani_sd2)
twoway ///
    (line w_sal_ecolr_cara_mean year if year<=2020, lcolor(blue) lpattern(solid) lwidth(medium) ///
        legend(label(1 "Economic salience") size(small))) ///
    (lfit w_sal_ecolr_cara_mean year if year<=2020, lcolor(red) lpattern(dash) legend(label(2 "Linear fit") size(small))), ///
    ytitle("Economic salience") xtitle("Year") ///
    xscale(range(2002(3)2020)) /// 
    legend(order(1 "Economic salience" 2 "Linear fit") size(small) region(lstyle(none))) ///
	name(sds2, replace)
bysort year: egen w_libaut_cara_mean=mean(w_libaut_caramani_sd2)
twoway ///
    (line w_libaut_cara_mean year if year<=2020, lcolor(blue) lpattern(solid) lwidth(medium) ///
        legend(label(1 "Cultural position") size(small))) ///
    (lfit w_libaut_cara_mean year if year<=2020, lcolor(red) lpattern(dash) legend(label(2 "Linear fit") size(small))), ///
    ytitle("Cultural position") xtitle("Year") ///
    xscale(range(2002(3)2020)) /// 
    legend(order(1 "Cultural position" 2 "Linear fit") size(small) region(lstyle(none))) ///
	name(sds3, replace)
bysort year: egen w_sal_libaut_cara_mean=mean(w_sal_libaut_caramani_sd2)
twoway ///
    (line w_sal_libaut_cara_mean year if year<=2020, lcolor(blue) lpattern(solid) lwidth(medium) ///
        legend(label(1 "Cultural salience") size(small))) ///
    (lfit w_sal_libaut_cara_mean year if year<=2020, lcolor(red) lpattern(dash) legend(label(2 "Linear fit") size(small))), ///
    ytitle("Cultural salience") xtitle("Year") ///
    xscale(range(2002(3)2020)) /// 
    legend(order(1 "Cultural salience" 2 "Linear fit") size(small) region(lstyle(none))) ///
	name(sds4, replace)
graph combine sds1 sds2 sds3 sds4, ysize(2.5) rows(2) cols(2)
graph save "Figure A2.gph", replace
drop w_ecolr_cara_mean w_libaut_cara_mean w_sal_ecolr_cara_mean w_sal_libaut_cara_mean

**# Figure A3
bysort year: egen w_ecolr_cara_mean=mean(w_ecolr_caramani_radl2)
twoway ///
    (line w_ecolr_cara_mean year if year<=2020, lcolor(blue) lpattern(solid) lwidth(medium) ///
        legend(label(1 "Economic position") size(small))) ///
    (lfit w_ecolr_cara_mean year if year<=2020, lcolor(red) lpattern(dash) legend(label(2 "Linear fit") size(small))), ///
    ytitle("Economic position") xtitle("Year") ///
    xscale(range(2002(3)2020)) /// 
    legend(order(1 "Economic position" 2 "Linear fit") size(small) region(lstyle(none))) ///
	name(rls1, replace)
bysort year: egen w_sal_ecolr_cara_mean=mean(w_sal_ecolr_caramani_radl2)
twoway ///
    (line w_sal_ecolr_cara_mean year if year<=2020, lcolor(blue) lpattern(solid) lwidth(medium) ///
        legend(label(1 "Economic salience") size(small))) ///
    (lfit w_sal_ecolr_cara_mean year if year<=2020, lcolor(red) lpattern(dash) legend(label(2 "Linear fit") size(small))), ///
    ytitle("Economic salience") xtitle("Year") ///
    xscale(range(2002(3)2020)) /// 
    legend(order(1 "Economic salience" 2 "Linear fit") size(small) region(lstyle(none))) ///
	name(rls2, replace)
bysort year: egen w_libaut_cara_mean=mean(w_libaut_caramani_radl2)
twoway ///
    (line w_libaut_cara_mean year if year<=2020, lcolor(blue) lpattern(solid) lwidth(medium) ///
        legend(label(1 "Cultural position") size(small))) ///
    (lfit w_libaut_cara_mean year if year<=2020, lcolor(red) lpattern(dash) legend(label(2 "Linear fit") size(small))), ///
    ytitle("Cultural position") xtitle("Year") ///
    xscale(range(2002(3)2020)) /// 
    legend(order(1 "Cultural position" 2 "Linear fit") size(small) region(lstyle(none))) ///
	name(rls3, replace)
bysort year: egen w_sal_libaut_cara_mean=mean(w_sal_libaut_caramani_radl2)
twoway ///
    (line w_sal_libaut_cara_mean year if year<=2020, lcolor(blue) lpattern(solid) lwidth(medium) ///
        legend(label(1 "Cultural salience") size(small))) ///
    (lfit w_sal_libaut_cara_mean year if year<=2020, lcolor(red) lpattern(dash) legend(label(2 "Linear fit") size(small))), ///
    ytitle("Cultural salience") xtitle("Year") ///
    xscale(range(2002(3)2020)) /// 
    legend(order(1 "Cultural salience" 2 "Linear fit") size(small) region(lstyle(none))) ///
	name(rls4, replace)
graph combine rls1 rls2 rls3 rls4, ysize(2.5) rows(2) cols(2)
graph save "Figure A3.gph", replace
drop w_ecolr_cara_mean w_libaut_cara_mean w_sal_ecolr_cara_mean w_sal_libaut_cara_mean


**# Figure A4
melogit left_voting year i.lgb ib(0).ageclass c.income_decile ib(0).education i.gndr ib(0).religion_den ib(0).ethnic_minority ib(0).urb_rur ib(0).workingclass_oesch##c.w_ecolr_caramani_cb2 caramani_eco_polar2 caramani_la_polar2  w_libaut_caramani_cb2 gincdif rec_imwbcnt  gini_pop gdp_imf wc_size visser_tud if agea>=18 & agea!=.a & year<=2020 [pweight = survey_weight], vce(cluster cntryn) or || cntry_year:
margins workingclass_oesch, at(w_ecolr_caramani_cb2=(-999.70001220703125 -45.54510116577148)) 
marginsplot, name(nmain1, replace)
melogit left_voting year i.lgb ib(0).ageclass c.income_decile ib(0).education i.gndr ib(0).religion_den ib(0).ethnic_minority ib(0).urb_rur ib(0).workingclass_oesch##c.w_sal_ecolr_caramani_cb2 caramani_eco_polar2 caramani_la_polar2  w_sal_libaut_caramani_cb2 gincdif rec_imwbcnt  gini_pop gdp_imf wc_size visser_tud if agea>=18 & agea!=.a & year<=2020 [pweight = survey_weight], vce(cluster cntryn) or || cntry_year:
margins workingclass_oesch, at(w_sal_ecolr_caramani_cb2=(115.39038085937500 1252.66406250000000)) 
marginsplot, name(nmain2, replace)
melogit left_voting year i.lgb ib(0).ageclass c.income_decile ib(0).education i.gndr ib(0).religion_den ib(0).ethnic_minority ib(0).urb_rur ib(0).workingclass_oesch##c.caramani_eco_polar2 caramani_la_polar2  w_ecolr_caramani_cb2 w_libaut_caramani_cb2 gincdif rec_imwbcnt  gini_pop gdp_imf wc_size visser_tud if agea>=18 & agea!=.a & year<=2020 [pweight = survey_weight], vce(cluster cntryn) or || cntry_year:
margins workingclass_oesch, at(caramani_eco_polar2=(0.38565337657928 4.63260221481323)) 
marginsplot, name(nmain3, replace)
melogit left_voting year i.lgb ib(0).ageclass c.income_decile ib(0).education i.gndr ib(0).religion_den ib(0).ethnic_minority ib(0).urb_rur ib(0).workingclass_oesch##c.w_libaut_caramani_cb2 caramani_eco_polar2 caramani_la_polar2  w_ecolr_caramani_cb2 gincdif rec_imwbcnt  gini_pop gdp_imf wc_size visser_tud if agea>=18 & agea!=.a & year<=2020 [pweight = survey_weight], vce(cluster cntryn) or || cntry_year:
margins workingclass_oesch, at(w_libaut_caramani_cb2=(-578.11791992187500 650.63867187500000)) 
marginsplot, name(nmain4, replace)
melogit left_voting year i.lgb ib(0).ageclass c.income_decile ib(0).education i.gndr ib(0).religion_den ib(0).ethnic_minority ib(0).urb_rur ib(0).workingclass_oesch##c.caramani_la_polar2 caramani_eco_polar2  w_ecolr_caramani_cb2 w_libaut_caramani_cb2 gincdif rec_imwbcnt  gini_pop gdp_imf wc_size visser_tud if agea>=18 & agea!=.a & year<=2020 [pweight = survey_weight], vce(cluster cntryn) or || cntry_year:
margins workingclass_oesch, at(caramani_la_polar2=(0.48751103878021 5.29416227340698)) 
marginsplot, name(nmain5, replace)
graph combine nmain1 nmain2 nmain3 nmain4 nmain5, ysize(2.5) rows(2) cols(3) holes(6)
graph save "Figure A4.gph", replace

**# Figure A4_regression table
eststo clear
eststo: melogit left_voting year i.lgb ib(0).ageclass c.income_decile ib(0).education i.gndr ib(0).religion_den ib(0).ethnic_minority ib(0).urb_rur ib(0).workingclass_oesch##c.w_ecolr_caramani_cb2 caramani_eco_polar2 caramani_la_polar2  w_libaut_caramani_cb2 gincdif rec_imwbcnt  gini_pop gdp_imf wc_size visser_tud if agea>=18 & agea!=.a & year<=2020 [pweight = survey_weight], vce(cluster cntryn) or || cntry_year:
eststo: melogit left_voting year i.lgb ib(0).ageclass c.income_decile ib(0).education i.gndr ib(0).religion_den ib(0).ethnic_minority ib(0).urb_rur ib(0).workingclass_oesch##c.w_sal_ecolr_caramani_cb2 caramani_eco_polar2 caramani_la_polar2  w_sal_libaut_caramani_cb2 gincdif rec_imwbcnt  gini_pop gdp_imf wc_size visser_tud if agea>=18 & agea!=.a & year<=2020 [pweight = survey_weight], vce(cluster cntryn) or || cntry_year:
eststo: melogit left_voting year i.lgb ib(0).ageclass c.income_decile ib(0).education i.gndr ib(0).religion_den ib(0).ethnic_minority ib(0).urb_rur ib(0).workingclass_oesch##c.caramani_eco_polar2 caramani_la_polar2  w_ecolr_caramani_cb2 w_libaut_caramani_cb2 gincdif rec_imwbcnt  gini_pop gdp_imf wc_size visser_tud if agea>=18 & agea!=.a & year<=2020 [pweight = survey_weight], vce(cluster cntryn) or || cntry_year:
eststo: melogit left_voting year i.lgb ib(0).ageclass c.income_decile ib(0).education i.gndr ib(0).religion_den ib(0).ethnic_minority ib(0).urb_rur ib(0).workingclass_oesch##c.w_libaut_caramani_cb2 caramani_eco_polar2 caramani_la_polar2  w_ecolr_caramani_cb2 gincdif rec_imwbcnt  gini_pop gdp_imf wc_size visser_tud if agea>=18 & agea!=.a & year<=2020 [pweight = survey_weight], vce(cluster cntryn) or || cntry_year:
eststo: melogit left_voting year i.lgb ib(0).ageclass c.income_decile ib(0).education i.gndr ib(0).religion_den ib(0).ethnic_minority ib(0).urb_rur ib(0).workingclass_oesch##c.caramani_la_polar2 caramani_eco_polar2  w_ecolr_caramani_cb2 w_libaut_caramani_cb2 gincdif rec_imwbcnt  gini_pop gdp_imf wc_size visser_tud if agea>=18 & agea!=.a & year<=2020 [pweight = survey_weight], vce(cluster cntryn) or || cntry_year:
esttab using Figure_A4_regtable.html, starlevels(* 0.05 ** 0.01 *** 0.001) scalars ("N") constant se(3) wide label mtitle b(3) replace brackets stats(N)
*** ICCs
melogit left_voting if agea>=18 & agea!=.a & year<=2020 [pweight = survey_weight], vce(cluster cntryn) or || cntry_year:
estat icc

**# Figure A5
melogit msd_voting i.lgb ib(0).ageclass c.income_decile ib(0).education i.gndr ib(0).religion_den ib(0).ethnic_minority ib(0).urb_rur caramani_eco_polar2 caramani_la_polar2 w_ecolr_caramani_sd2 w_libaut_caramani_sd2 gincdif rec_imwbcnt ib(0).workingclass_oesch##c.year gini_pop gdp_imf wc_size visser_tud if agea>=18 & agea!=.a & year<=2020 [pweight = survey_weight], vce(cluster cntryn) or || cntry_year:
margins workingclass_oesch, at(year=(2002 2020)) 
marginsplot
graph save "Figure A5.gph", replace

**# Figure A5_regression table
eststo clear
eststo: melogit msd_voting i.lgb ib(0).ageclass c.income_decile ib(0).education i.gndr ib(0).religion_den ib(0).ethnic_minority ib(0).urb_rur caramani_eco_polar2 caramani_la_polar2 w_ecolr_caramani_sd2 w_libaut_caramani_sd2 gincdif rec_imwbcnt ib(0).workingclass_oesch##c.year gini_pop gdp_imf wc_size visser_tud if agea>=18 & agea!=.a & year<=2020 [pweight = survey_weight], vce(cluster cntryn) or || cntry_year:
esttab using Figure_A5_regtable.html, starlevels(* 0.05 ** 0.01 *** 0.001) scalars ("N") constant se(3) wide label mtitle b(3) replace brackets stats(N)
*** ICCs
melogit msd_voting if agea>=18 & agea!=.a & year<=2020 [pweight = survey_weight], vce(cluster cntryn) or || cntry_year:
estat icc

**# Figure A6
melogit radleft_voting i.lgb ib(0).ageclass c.income_decile ib(0).education i.gndr ib(0).religion_den ib(0).ethnic_minority ib(0).urb_rur caramani_eco_polar2 caramani_la_polar2 w_ecolr_caramani_radl2 w_libaut_caramani_radl2 gincdif rec_imwbcnt ib(0).workingclass_oesch##c.year gini_pop gdp_imf wc_size visser_tud if agea>=18 & agea!=.a & year<=2020 [pweight = survey_weight], vce(cluster cntryn) or || cntry_year:
margins workingclass_oesch, at(year=(2002 2020)) 
marginsplot
graph save "Figure A6.gph", replace

**# Figure A6_regression table
eststo clear
eststo: melogit radleft_voting i.lgb ib(0).ageclass c.income_decile ib(0).education i.gndr ib(0).religion_den ib(0).ethnic_minority ib(0).urb_rur caramani_eco_polar2 caramani_la_polar2 w_ecolr_caramani_radl2 w_libaut_caramani_radl2 gincdif rec_imwbcnt ib(0).workingclass_oesch##c.year gini_pop gdp_imf wc_size visser_tud if agea>=18 & agea!=.a & year<=2020 [pweight = survey_weight], vce(cluster cntryn) or || cntry_year:
esttab using Figure_A6_regtable.html, starlevels(* 0.05 ** 0.01 *** 0.001) scalars ("N") constant se(3) wide label mtitle b(3) replace brackets stats(N)
*** ICCs
melogit radleft_voting if agea>=18 & agea!=.a & year<=2020 [pweight = survey_weight], vce(cluster cntryn) or || cntry_year:
estat icc

**# Figure A7
melogit left_voting year i.lgb ib(0).ageclass c.income_decile ib(0).education i.gndr ib(0).religion_den ib(0).ethnic_minority ib(0).urb_rur ib(0).workingclass_oesch##c.w_sal_libaut_bakkhob_cb2 ecolr_polarisation2 libaut_polarisation2 w_sal_ecolr_bakkhob_cb2 gincdif rec_imwbcnt  gini_pop gdp_imf wc_size visser_tud if agea>=18 & agea!=.a & year<=2020 [pweight = survey_weight], vce(cluster cntryn) or || cntry_year:
margins workingclass_oesch, at(w_sal_libaut_bakkhob_cb2=(67.16551208496094 1591.32214355468750)) 
marginsplot
graph save "Figure A7.gph", replace

**# Figure A7_regression table
eststo clear
eststo: melogit left_voting year i.lgb ib(0).ageclass c.income_decile ib(0).education i.gndr ib(0).religion_den ib(0).ethnic_minority ib(0).urb_rur ib(0).workingclass_oesch##c.w_sal_libaut_bakkhob_cb2 ecolr_polarisation2 libaut_polarisation2 w_sal_ecolr_bakkhob_cb2 gincdif rec_imwbcnt  gini_pop gdp_imf wc_size visser_tud if agea>=18 & agea!=.a & year<=2020 [pweight = survey_weight], vce(cluster cntryn) or || cntry_year:
esttab using Figure_A7_regtable.html, starlevels(* 0.05 ** 0.01 *** 0.001) scalars ("N") constant se(3) wide label mtitle b(3) replace brackets
*** ICCs
melogit left_voting if agea>=18 & agea!=.a & year<=2020 [pweight = survey_weight], vce(cluster cntryn) or || cntry_year:
estat icc

**# Figure A8
melogit msd_voting year i.lgb ib(0).ageclass c.income_decile ib(0).education i.gndr ib(0).religion_den ib(0).ethnic_minority ib(0).urb_rur ib(0).workingclass_oesch##c.w_ecolr_bakkhob_sd2 ecolr_polarisation2 libaut_polarisation2 w_libaut_bakkhob_sd2 gincdif rec_imwbcnt  gini_pop gdp_imf wc_size visser_tud if agea>=18 & agea!=.a & year<=2020 [pweight = survey_weight], vce(cluster cntryn) or || cntry_year:
margins workingclass_oesch, at(w_ecolr_bakkhob_sd2=(-1636.37683105468750 -45.30816268920898)) 
marginsplot, name(msdbh1, replace)
melogit msd_voting year i.lgb ib(0).ageclass c.income_decile ib(0).education i.gndr ib(0).religion_den ib(0).ethnic_minority ib(0).urb_rur ib(0).workingclass_oesch##c.w_sal_ecolr_bakkhob_sd2 ecolr_polarisation2 libaut_polarisation2 w_sal_libaut_bakkhob_sd2 gincdif rec_imwbcnt  gini_pop gdp_imf wc_size visser_tud if agea>=18 & agea!=.a & year<=2020 [pweight = survey_weight], vce(cluster cntryn) or || cntry_year:
margins workingclass_oesch, at(w_sal_ecolr_bakkhob_sd2=(183.08341979980469 1903.02893066406250))
marginsplot, name(msdbh2, replace)
melogit msd_voting year i.lgb ib(0).ageclass c.income_decile ib(0).education i.gndr ib(0).religion_den ib(0).ethnic_minority ib(0).urb_rur ib(0).workingclass_oesch##c.w_sal_libaut_bakkhob_sd2 ecolr_polarisation2 libaut_polarisation2 w_sal_ecolr_bakkhob_sd2 gincdif rec_imwbcnt  gini_pop gdp_imf wc_size visser_tud if agea>=18 & agea!=.a & year<=2020 [pweight = survey_weight], vce(cluster cntryn) or || cntry_year:
margins workingclass_oesch, at(w_sal_libaut_bakkhob_sd2=(92.03671264648438 1591.32214355468750)) 
marginsplot, name(msdbh3, replace)
melogit msd_voting year i.lgb ib(0).ageclass c.income_decile ib(0).education i.gndr ib(0).religion_den ib(0).ethnic_minority ib(0).urb_rur ib(0).workingclass_oesch##c.ecolr_polarisation2 libaut_polarisation2 w_ecolr_bakkhob_sd2 w_libaut_bakkhob_sd2 gincdif rec_imwbcnt  gini_pop gdp_imf wc_size visser_tud if agea>=18 & agea!=.a & year<=2020 & year<=2020 [pweight = survey_weight], vce(cluster cntryn) or || cntry_year:
margins workingclass_oesch, at(ecolr_polarisation2=(0.69770139455795 5.60419845581055)) 
marginsplot, name(msdbh4, replace)
graph combine msdbh1 msdbh2 msdbh3 msdbh4
graph save "Figure A8.gph", replace

**# Figure A8_regression table
eststo clear
eststo: melogit msd_voting year i.lgb ib(0).ageclass c.income_decile ib(0).education i.gndr ib(0).religion_den ib(0).ethnic_minority ib(0).urb_rur ib(0).workingclass_oesch##c.w_ecolr_bakkhob_sd2 ecolr_polarisation2 libaut_polarisation2 w_libaut_bakkhob_sd2 gincdif rec_imwbcnt  gini_pop gdp_imf wc_size visser_tud if agea>=18 & agea!=.a & year<=2020 [pweight = survey_weight], vce(cluster cntryn) or || cntry_year:
eststo: melogit msd_voting year i.lgb ib(0).ageclass c.income_decile ib(0).education i.gndr ib(0).religion_den ib(0).ethnic_minority ib(0).urb_rur ib(0).workingclass_oesch##c.w_sal_ecolr_bakkhob_sd2 ecolr_polarisation2 libaut_polarisation2 w_sal_libaut_bakkhob_sd2 gincdif rec_imwbcnt  gini_pop gdp_imf wc_size visser_tud if agea>=18 & agea!=.a & year<=2020 [pweight = survey_weight], vce(cluster cntryn) or || cntry_year:
eststo: melogit msd_voting year i.lgb ib(0).ageclass c.income_decile ib(0).education i.gndr ib(0).religion_den ib(0).ethnic_minority ib(0).urb_rur ib(0).workingclass_oesch##c.w_sal_libaut_bakkhob_sd2 ecolr_polarisation2 libaut_polarisation2 w_sal_ecolr_bakkhob_sd2 gincdif rec_imwbcnt  gini_pop gdp_imf wc_size visser_tud if agea>=18 & agea!=.a & year<=2020 [pweight = survey_weight], vce(cluster cntryn) or || cntry_year:
eststo: melogit msd_voting year i.lgb ib(0).ageclass c.income_decile ib(0).education i.gndr ib(0).religion_den ib(0).ethnic_minority ib(0).urb_rur ib(0).workingclass_oesch##c.ecolr_polarisation2 libaut_polarisation2 w_ecolr_bakkhob_sd2 w_libaut_bakkhob_sd2 gincdif rec_imwbcnt  gini_pop gdp_imf wc_size visser_tud if agea>=18 & agea!=.a & year<=2020 [pweight = survey_weight], vce(cluster cntryn) or || cntry_year:
esttab using Figure_A8_regtable.html, starlevels(* 0.05 ** 0.01 *** 0.001) scalars ("N") constant se(3) wide label mtitle b(3) replace brackets stats(N)
*** ICCs
melogit msd_voting if agea>=18 & agea!=.a & year<=2020 [pweight = survey_weight], vce(cluster cntryn) or || cntry_year:
estat icc

**# Figure A9
melogit radleft_voting year i.lgb ib(0).ageclass c.income_decile ib(0).education i.gndr ib(0).religion_den ib(0).ethnic_minority ib(0).urb_rur ib(0).workingclass_oesch##c.w_sal_libaut_caramani_radl2 caramani_eco_polar2 caramani_la_polar2 w_sal_ecolr_caramani_radl2 gincdif rec_imwbcnt  gini_pop gdp_imf wc_size visser_tud if agea>=18 & agea!=.a & year<=2020 [pweight = survey_weight], vce(cluster cntryn) or || cntry_year:
margins workingclass_oesch, at(w_sal_libaut_caramani_radl2=(7.38401365280151 813.65411376953125)) 
marginsplot
graph save "Figure A9.gph", replace

**# Figure A9_regression table
eststo clear
eststo: melogit radleft_voting year i.lgb ib(0).ageclass c.income_decile ib(0).education i.gndr ib(0).religion_den ib(0).ethnic_minority ib(0).urb_rur ib(0).workingclass_oesch##c.w_sal_libaut_bakkhob_radl2 ecolr_polarisation2 libaut_polarisation2 w_sal_ecolr_bakkhob_radl2 gincdif rec_imwbcnt  gini_pop gdp_imf wc_size visser_tud if agea>=18 & agea!=.a & year<=2020 [pweight = survey_weight], vce(cluster cntryn) or || cntry_year:
esttab using Figure_A9_regtable.html, starlevels(* 0.05 ** 0.01 *** 0.001) scalars ("N") constant se(3) wide label mtitle b(3) replace brackets stats(N)
*** ICCs
melogit radleft_voting if agea>=18 & agea!=.a & year<=2020 [pweight = survey_weight], vce(cluster cntryn) or || cntry_year:
estat icc

**# Figure A10
melogit left_voting i.lgb ib(0).ageclass c.income_decile ib(0).education i.gndr ib(0).religion_den ib(0).ethnic_minority ib(0).urb_rur caramani_eco_polar2 caramani_la_polar2  w_ecolr_caramani_cb2 w_libaut_caramani_cb2  gincdif rec_imwbcnt ib(0).workingclass_oesch##c.year gini_pop gdp_imf wc_size visser_tud if agea>=18 & agea!=.a & year<=2020 & cntry!="LU" & cntry!="IS" & cntry!="AT" & cntry!="CY" & cntry!="GR" & cntry!="IT" & cntry!="DK" [pweight = survey_weight], vce(cluster cntryn) or || cntry_year:
margins workingclass_oesch, at(year=(2002 2020)) 
marginsplot
graph save "Figure A10.gph", replace

**# Figure A10_regression table
eststo clear
eststo: melogit left_voting i.lgb ib(0).ageclass c.income_decile ib(0).education i.gndr ib(0).religion_den ib(0).ethnic_minority ib(0).urb_rur caramani_eco_polar2 caramani_la_polar2  w_ecolr_caramani_cb2 w_libaut_caramani_cb2  gincdif rec_imwbcnt ib(0).workingclass_oesch##c.year gini_pop gdp_imf wc_size visser_tud if agea>=18 & agea!=.a & year<=2020 & cntry!="LU" & cntry!="IS" & cntry!="AT" & cntry!="CY" & cntry!="GR" & cntry!="IT" & cntry!="DK" [pweight = survey_weight], vce(cluster cntryn) or || cntry_year:
esttab using Figure_A10_regtable.html, starlevels(* 0.05 ** 0.01 *** 0.001) scalars ("N") constant se(3) wide label mtitle b(3) replace brackets stats(N)
*** ICCs
melogit left_voting if agea>=18 & agea!=.a & year<=2020 [pweight = survey_weight], vce(cluster cntryn) or || cntry_year:
estat icc

**# Figure A11
melogit left_voting year i.lgb ib(0).ageclass c.income_decile ib(0).education i.gndr ib(0).religion_den ib(0).ethnic_minority ib(0).urb_rur ib(0).workingclass_oesch##c.w_sal_libaut_caramani_cb2 caramani_eco_polar2 caramani_la_polar2 w_sal_ecolr_caramani_cb2 gincdif rec_imwbcnt  gini_pop gdp_imf wc_size visser_tud if agea>=18 & agea!=.a & year<=2020 & cntry!="LU" & cntry!="IS" & cntry!="AT" & cntry!="CY" & cntry!="GR" & cntry!="IT" & cntry!="DK" [pweight = survey_weight], vce(cluster cntryn) or || cntry_year:
margins workingclass_oesch, at(w_sal_libaut_caramani_cb2=(64.61941528320312  1102.82006835937500)) 
marginsplot
graph save "Figure A11.gph", replace

**# Figure A11_regression table
eststo clear
eststo: melogit left_voting year i.lgb ib(0).ageclass c.income_decile ib(0).education i.gndr ib(0).religion_den ib(0).ethnic_minority ib(0).urb_rur ib(0).workingclass_oesch##c.w_sal_libaut_caramani_cb2 caramani_eco_polar2 caramani_la_polar2 w_sal_ecolr_caramani_cb2 gincdif rec_imwbcnt  gini_pop gdp_imf wc_size visser_tud if agea>=18 & agea!=.a & year<=2020 & cntry!="LU" & cntry!="IS" & cntry!="AT" & cntry!="CY" & cntry!="GR" & cntry!="IT" & cntry!="DK" [pweight = survey_weight], vce(cluster cntryn) or || cntry_year:
esttab using Figure_A11_regtable.html, starlevels(* 0.05 ** 0.01 *** 0.001) scalars ("N") constant se(3) wide label mtitle b(3) replace brackets stats(N)
*** ICCs
melogit left_voting if agea>=18 & agea!=.a & year<=2020 [pweight = survey_weight], vce(cluster cntryn) or || cntry_year:
estat icc

**# Figure A12
melogit msd_voting year i.lgb ib(0).ageclass c.income_decile ib(0).education i.gndr ib(0).religion_den ib(0).ethnic_minority ib(0).urb_rur ib(0).workingclass_oesch##c.w_ecolr_caramani_sd2 caramani_eco_polar2 caramani_la_polar2 w_libaut_caramani_sd2 gincdif rec_imwbcnt  gini_pop gdp_imf wc_size visser_tud if agea>=18 & agea!=.a & year<=2020 & cntry!="LU" & cntry!="IS" & cntry!="AT" & cntry!="CY" & cntry!="GR" & cntry!="IT" & cntry!="DK" [pweight = survey_weight], vce(cluster cntryn) or || cntry_year:
margins workingclass_oesch, at(w_ecolr_caramani_sd2=(-1135.11791992187500 -22.18190002441406)) 
marginsplot, name(msd1, replace)
melogit msd_voting year i.lgb ib(0).ageclass c.income_decile ib(0).education i.gndr ib(0).religion_den ib(0).ethnic_minority ib(0).urb_rur ib(0).workingclass_oesch##c.w_sal_ecolr_caramani_sd2 caramani_eco_polar2 caramani_la_polar2 w_sal_libaut_caramani_sd2 gincdif rec_imwbcnt  gini_pop gdp_imf wc_size visser_tud if agea>=18 & agea!=.a & year<=2020 & cntry!="LU" & cntry!="IS" & cntry!="AT" & cntry!="CY" & cntry!="GR" & cntry!="IT" & cntry!="DK" [pweight = survey_weight], vce(cluster cntryn) or || cntry_year:
margins workingclass_oesch, at(w_sal_ecolr_caramani_sd2=(120.05955505371094 1318.60266113281250)) 
marginsplot, name(msd2, replace)
melogit msd_voting year i.lgb ib(0).ageclass c.income_decile ib(0).education i.gndr ib(0).religion_den ib(0).ethnic_minority ib(0).urb_rur ib(0).workingclass_oesch##c.w_sal_libaut_caramani_sd2 caramani_eco_polar2 caramani_la_polar2 w_sal_ecolr_caramani_sd2 gincdif rec_imwbcnt  gini_pop gdp_imf wc_size visser_tud if agea>=18 & agea!=.a & year<=2020 & cntry!="LU" & cntry!="IS" & cntry!="AT" & cntry!="CY" & cntry!="GR" & cntry!="IT" & cntry!="DK" [pweight = survey_weight], vce(cluster cntryn) or || cntry_year:
margins workingclass_oesch, at(w_sal_libaut_caramani_sd2=(84.71755218505859 1102.82006835937500)) 
marginsplot, name(msd3, replace)
melogit msd_voting year i.lgb ib(0).ageclass c.income_decile ib(0).education i.gndr ib(0).religion_den ib(0).ethnic_minority ib(0).urb_rur ib(0).workingclass_oesch##c.caramani_eco_polar2 caramani_la_polar2 w_ecolr_caramani_sd2 w_libaut_caramani_sd2 gincdif rec_imwbcnt  gini_pop gdp_imf wc_size visser_tud if agea>=18 & agea!=.a & year<=2020 & cntry!="LU" & cntry!="IS" & cntry!="AT" & cntry!="CY" & cntry!="GR" & cntry!="IT" & cntry!="DK" [pweight = survey_weight], vce(cluster cntryn) or || cntry_year:
margins workingclass_oesch, at(caramani_eco_polar2=(0.38565337657928 4.63260221481323)) 
marginsplot, name(msd4, replace)
graph combine msd1 msd2 msd3 msd4, ysize(2.5) xsize(3.5) rows(2) cols(2)
graph save "Figure A12.gph", replace

**# Figure A12_regression table
eststo clear
eststo: melogit msd_voting year i.lgb ib(0).ageclass c.income_decile ib(0).education i.gndr ib(0).religion_den ib(0).ethnic_minority ib(0).urb_rur ib(0).workingclass_oesch##c.w_ecolr_caramani_sd2 caramani_eco_polar2 caramani_la_polar2 w_libaut_caramani_sd2 gincdif rec_imwbcnt  gini_pop gdp_imf wc_size visser_tud if agea>=18 & agea!=.a & year<=2020 & cntry!="LU" & cntry!="IS" & cntry!="AT" & cntry!="CY" & cntry!="GR" & cntry!="IT" & cntry!="DK" [pweight = survey_weight], vce(cluster cntryn) or || cntry_year:
eststo: melogit msd_voting year i.lgb ib(0).ageclass c.income_decile ib(0).education i.gndr ib(0).religion_den ib(0).ethnic_minority ib(0).urb_rur ib(0).workingclass_oesch##c.w_sal_ecolr_caramani_sd2 caramani_eco_polar2 caramani_la_polar2 w_sal_libaut_caramani_sd2 gincdif rec_imwbcnt  gini_pop gdp_imf wc_size visser_tud if agea>=18 & agea!=.a & year<=2020 & cntry!="LU" & cntry!="IS" & cntry!="AT" & cntry!="CY" & cntry!="GR" & cntry!="IT" & cntry!="DK" [pweight = survey_weight], vce(cluster cntryn) or || cntry_year:
eststo: melogit msd_voting year i.lgb ib(0).ageclass c.income_decile ib(0).education i.gndr ib(0).religion_den ib(0).ethnic_minority ib(0).urb_rur ib(0).workingclass_oesch##c.w_sal_libaut_caramani_sd2 caramani_eco_polar2 caramani_la_polar2 w_sal_ecolr_caramani_sd2 gincdif rec_imwbcnt  gini_pop gdp_imf wc_size visser_tud if agea>=18 & agea!=.a & year<=2020 & cntry!="LU" & cntry!="IS" & cntry!="AT" & cntry!="CY" & cntry!="GR" & cntry!="IT" & cntry!="DK" [pweight = survey_weight], vce(cluster cntryn) or || cntry_year:
eststo: melogit msd_voting year i.lgb ib(0).ageclass c.income_decile ib(0).education i.gndr ib(0).religion_den ib(0).ethnic_minority ib(0).urb_rur ib(0).workingclass_oesch##c.caramani_eco_polar2 caramani_la_polar2 w_ecolr_caramani_sd2 w_libaut_caramani_sd2 gincdif rec_imwbcnt  gini_pop gdp_imf wc_size visser_tud if agea>=18 & agea!=.a & year<=2020 & cntry!="LU" & cntry!="IS" & cntry!="AT" & cntry!="CY" & cntry!="GR" & cntry!="IT" & cntry!="DK" [pweight = survey_weight], vce(cluster cntryn) or || cntry_year:
esttab using Figure_A12_regtable.html, starlevels(* 0.05 ** 0.01 *** 0.001) scalars ("N") constant se(3) wide label mtitle b(3) replace brackets stats(N)
*** ICCs
melogit left_voting if agea>=18 & agea!=.a & year<=2020 [pweight = survey_weight], vce(cluster cntryn) or || cntry_year:
estat icc

**# Figure A13
melogit radleft_voting year i.lgb ib(0).ageclass c.income_decile ib(0).education i.gndr ib(0).religion_den ib(0).ethnic_minority ib(0).urb_rur ib(0).workingclass_oesch##c.w_sal_libaut_caramani_radl2 caramani_eco_polar2 caramani_la_polar2 w_sal_ecolr_caramani_radl2 gincdif rec_imwbcnt  gini_pop gdp_imf wc_size visser_tud if agea>=18 & agea!=.a & year<=2020 & cntry!="LU" & cntry!="IS" & cntry!="AT" & cntry!="CY" & cntry!="GR" & cntry!="IT" & cntry!="DK" [pweight = survey_weight], vce(cluster cntryn) or || cntry_year:
margins workingclass_oesch, at(w_sal_libaut_caramani_radl2=(7.38401365280151 813.65411376953125)) 
marginsplot
graph save "Figure A13.gph", replace

**# Figure A13_regression table
eststo clear
eststo: melogit radleft_voting year i.lgb ib(0).ageclass c.income_decile ib(0).education i.gndr ib(0).religion_den ib(0).ethnic_minority ib(0).urb_rur ib(0).workingclass_oesch##c.w_sal_libaut_caramani_radl2 caramani_eco_polar2 caramani_la_polar2 w_sal_ecolr_caramani_radl2 gincdif rec_imwbcnt  gini_pop gdp_imf wc_size visser_tud if agea>=18 & agea!=.a & year<=2020 & cntry!="LU" & cntry!="IS" & cntry!="AT" & cntry!="CY" & cntry!="GR" & cntry!="IT" & cntry!="DK" [pweight = survey_weight], vce(cluster cntryn) or || cntry_year:
esttab using Figure_A13_regtable.html, starlevels(* 0.05 ** 0.01 *** 0.001) scalars ("N") constant se(3) wide label mtitle b(3) replace brackets stats(N)
*** ICCs
melogit left_voting if agea>=18 & agea!=.a & year<=2020 [pweight = survey_weight], vce(cluster cntryn) or || cntry_year:
estat icc

**# Figure A14
melogit left_voting i.lgb ib(0).ageclass c.income_decile ib(0).education i.gndr ib(0).religion_den ib(0).ethnic_minority ib(0).urb_rur caramani_eco_polar2 caramani_la_polar2 w_ecolr_caramani_cb2 gincdif rec_imwbcnt ib(0).workingclass_oesch##c.w_libaut_caramani_cb2##i.h_sal_libaut_caramani_cb22 c.year gini_pop gdp_imf wc_size visser_tud if agea>=18 & agea!=.a & year<=2020 [pweight = survey_weight], vce(cluster cntryn) or || cntry_year:
margins workingclass_oesch, at(h_sal_libaut_caramani_cb22=(0 1) w_libaut_caramani_cb2=(-578.11791992187500 650.63867187500000)) 
marginsplot, xdimension(w_libaut_caramani_cb2) by(h_sal_libaut_caramani_cb22) legend(order(1 "Not working class" 2 "Working class"))
graph save "Figure A14.gph", replace

**# Figure A15
melogit left_voting i.lgb ib(0).ageclass c.income_decile ib(0).education i.gndr ib(0).religion_den ib(0).ethnic_minority ib(0).urb_rur ecolr_polarisation2 libaut_polarisation2 w_ecolr_bakkhob_cb2 gincdif rec_imwbcnt ib(0).workingclass_oesch##c.w_libaut_bakkhob_cb2##i.h_sal_libaut_bakkhob_cb22 c.year gini_pop gdp_imf wc_size visser_tud if agea>=18 & agea!=.a & year<=2020 [pweight = survey_weight], vce(cluster cntryn) or || cntry_year:
margins workingclass_oesch, at(h_sal_libaut_bakkhob_cb22=(0 1) w_libaut_bakkhob_cb2=(-566.25537109375000 242.23051452636719)) 
marginsplot, xdimension(w_libaut_bakkhob_cb2) by(h_sal_libaut_bakkhob_cb22) legend(order(1 "Not working class" 2 "Working class"))
graph save "Figure A15.gph", replace
